From 7e6a2a32881d6e6356bbf4eb1461458c95a380d1 Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Thu, 13 Oct 2005 17:49:56 +0100 Subject: [PATCH] Remove the diagnostic/recovery when two domains end up with the same name. It was working around bugs that have gone, and is now more dangerous than useful -- deadlock is a possibility with this code now. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/XendDomain.py | 11 ++--------- tools/python/xen/xend/XendDomainInfo.py | 22 ---------------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 66668ef6e9..ce4007b984 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -313,18 +313,11 @@ class XendDomain: def domain_lookup_by_name_nr(self, name): self.domains_lock.acquire() try: - matching = filter( - lambda d: d.getName() == name and not d.isShutdown(), - self.domains.values()) + matching = filter(lambda d: d.getName() == name, + self.domains.values()) n = len(matching) if n == 1: return matching[0] - elif n > 1: - log.error('Name uniqueness has been violated for name %s! ' - 'Recovering by renaming:', name) - for d in matching: - d.renameUniquely() - return None finally: self.domains_lock.release() diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index b387df108d..0ff379f7b9 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -840,14 +840,6 @@ class XendDomainInfo: self.state_updated.release() - def isShutdown(self): - self.state_updated.acquire() - try: - return self.state == STATE_DOM_SHUTDOWN - finally: - self.state_updated.release() - - def __str__(self): s = "